layui.use('dropdown', function () {
      var dropdown = layui.dropdown
      dropdown.render({
        elem: '#demo1' //可绑定在任意元素中，此处以上述按钮为例
        , data: [{
          title: 'menu item 1'
          , id: 100
          , href: '#'
        }]
        , id: 'demo1'
        //菜单被点击的事件
        , click: function (obj) {
          console.log(obj);
          layer.msg('回调返回的参数已显示再控制台');
        }
      });
    });
  
    layui.use(['table'], function () {
      var table = layui.table;
      table.render(
        {
          elem: "#demo",

          url: "http://localhost:8080/car/page",
          method: 'GET',
          loading: true,
          page: true,
          limit: 2,
          limits: [2, 4, 6,],
          request: {
            pageName: "page",
            limitName: "pageSize"
          },
          cols: [[
            {
              field: 'id',
              title: '名次',
              sort: true
            },
            {

              field: 'checki',
              title: '检查站',
              sort: true
            },
            {
              field: 'car',
              title: '通行车辆',
              sort: true
            },
            {
              field: 'gocar',
              title: '过检车辆',
              sort: true
            },
            {
              field: 'zhongcar',
              title: '中标车辆',
              sort: true
            }
          ]],
          parseData: function (d) {
            console.log(d);
            return {
              "code": d.code,
              "msg": d.msg,
              "count": d.data.total,
              "data": d.data.records
            }
          }
        }
      )
    })


   
